package day2

class Cat {
  var name:String = _
  var age:Int = _

  // 辅助构造方法
  def this(name:String) = {
    this()
    this.name = name
  }

  def this(name:String,age:Int) = {
    this(name)
    this.age = age
  }

  def show() = {
    println(s"在下${name},今年${age}")
  }
}
